@model OrchardCore.ContentFields.ViewModels.EditDateFieldViewModel

@{
    var settings = Model.PartFieldDefinition.GetSettings<DateFieldSettings>();
    var language = Orchard.CultureName().Split('-')[0];
    var datepickerId = Html.IdFor(m => m.Value);
}

<div class="form-group">
    <div class="row col-md-6 col-lg-4">
        <label asp-for="Value">@Model.PartFieldDefinition.DisplayName()</label>
        <input asp-for="Value" type="text" class="form-control content-preview-select datepicker" required="@settings.Required" />
        <span class="hint">@settings.Hint</span>
    </div>
</div>

<script at="Foot">
    $(function () {
        $('#@datepickerId').datepicker($.datepicker.regional['@language']);
    });
</script>
